package com.mallcai.bigdata.ladon.service.peekdata;

import com.mallcai.bigdata.ladon.dpl.entity.peekdata.Model;
import com.mallcai.bigdata.ladon.dpl.entity.peekdata.ModelMeta;

import java.util.List;
import java.util.Map;

/**
 * Created by oneape<oneape15@163.com>
 * Created 2019-05-22 14:29.
 * Modify:
 */
public interface IModelService {

    int addModelInfo(Model model, List<ModelMeta> fields);

    int editModelInfo(Model model, List<ModelMeta> fields);

    int upgradeModelInfo(Model model, List<ModelMeta> fields);

    int changeStatus(Model model);

    int deleteModelInfo(Model model);

    Model getById(Long modelId);

    List<Model> getByParams(Map<String, Object> params);

    List<Model> getAllModels();

    /**
     * 查询指定modelId下的所有meta
     * @param modelId
     * @return
     */
    List<ModelMeta> listMetaByModelId(Long modelId);


    /**
     * 获取模型字段分组
     *
     * @param modelId Long
     * @return List
     */
    List<String> getColumnsGroupByModelId(Long modelId);

    /**
     * 返回执行的模型详细信息
     * @param modelId
     * @return
     */
    Model readModel(Long modelId);
}
